#include <bits/stdc++.h>

using namespace std;

struct Node
{
    int address = 0;
    int target  = 0;
};

struct myCompare{
    //设置priority_queue的比较函数
    bool operator()(Node a, Node b){
        return a.target < b.target;
    }
};

int nums[100] = {0};

int main()
{
    //建立大根堆
    priority_queue<Node, vector<Node>, myCompare> q;
    int n = 0;
    cin >> n;
    for(int i = 0; i < n; i++)
    {
        cin >> nums[i];
        Node node;
        node.address = i;
        node.target = nums[i] + i;
        q.push(node); 
    }
    
    int now = n-1;
    int count = 0;
    Node last;
    last = q.top();
    while(now > 0 && !q.empty())
    {
        Node temp = q.top();
        if(temp.target >= now){
            q.pop();
            if(temp.address < last.address)
                last = temp;
        }else{
            count++;
            now = last.address;
        }
    }

    cout << count + 1;
    return 0;
}